# $Id: PKGBUILD 184375 2013-05-06 19:37:03Z foutrelis $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: boromil@gmail.com

pkgname=ffmpegthumbnailer
pkgver=2.0.8
pkgrel=3
pkgdesc="Lightweight video thumbnailer that can be used by file managers."
url="http://code.google.com/p/ffmpegthumbnailer/"
license=('GPL2')
arch=('i686' 'x86_64')
depends=('ffmpeg' 'libjpeg' 'libpng')
optdepends=('gvfs: support for gio uris')
source=("http://ffmpegthumbnailer.googlecode.com/files/$pkgname-$pkgver.tar.gz"
        "ffmpegthumbnailer-2.0.8-memcpy.patch")
options=('!libtool')
sha1sums=('2c54ca16efd953f46547e22799cfc40bd9c24533'
          'c23ef173f98c928fcacacd6e6060dab2e56f1239')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  patch -Np0 -i "${srcdir}/ffmpegthumbnailer-2.0.8-memcpy.patch"
}
build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr --enable-gio --enable-thumbnailer

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
